package com.jx.controller.api;

import com.jx.common.result.AjaxResult;
import com.jx.pojo.po.content.SidebarMenuPO;
import com.jx.service.api.CategoryApiService;
import com.jx.service.content.CategoryService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/api/category")
public class CategoryApiController {

    @Resource
    private CategoryApiService categoryApiService;

    /**
     * 获取所有的菜单
     */
    @GetMapping("/listAllMenus")
    public AjaxResult listAllMenus() {
        List<SidebarMenuPO> result =  categoryApiService.listAllMenus();
        return AjaxResult.success(result);
    }

}
